package com.example.alladapter.Datas;

import android.content.ContentValues;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;

public class DAO {
    private Context mContext;
    private DbHelper dbHelper;

    public DAO(Context context) {
        mContext = context;
        dbHelper = new DbHelper(context);
        dbHelper.getWritableDatabase();
    }

    public void insert_MMB(String name, String info, String data) {
        SQLiteDatabase db = dbHelper.getWritableDatabase();
        ContentValues contentValues = new ContentValues();
        contentValues.put(NameStrings.DbName, name);
        contentValues.put(NameStrings.TableInformation, info);
        contentValues.put(NameStrings.TableDate, data);
        contentValues.put(NameStrings.TableT1, 0);
        contentValues.put(NameStrings.TableT2, 0);
        db.insert(NameStrings.DbTableName, null, contentValues);
        contentValues.clear();
        db.close();
    }
}
